package com.easybacklog.client.webservices;

import com.easybacklog.client.EasyBacklogGlobalVariables;
import com.easybacklog.client.model.Project;
import com.easybacklog.client.model.ProjectFeature;
import com.easybacklog.client.webservices.github.RequestGithubFileContent;
import com.easybacklog.client.webservices.subversion.RequestSubversionFileContent;

public class GetFileContent {

	public GetFileContent(ProjectFeature projectEntry, Project project) {

		String featuresUrl = EasyBacklogGlobalVariables.currentProject
				.getRepositoryURL()
				+ "/"
				+ EasyBacklogGlobalVariables.featuresPath;

		if (Project.REPOSITORY_TYPE_SUBVERSION.equals(project
				.getRepositoryType())) {

			RequestSubversionFileContent.getJsonpRequest(featuresUrl,
					projectEntry.toString());

		} else if (Project.REPOSITORY_TYPE_GIT.equals(project
				.getRepositoryType())) {

			RequestGithubFileContent.getJsonpRequest(project, projectEntry);

		} else if (Project.REPOSITORY_TYPE_LOCAL.equals(project
				.getRepositoryType())) {

		}
	}
}
